package com.mobdev.notepad.shared.ui;

import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.preference.Preference;
import android.util.AttributeSet;

public class AbstractCreateAccountPreference extends Preference
{
	private Intent createAccountIntent;
	
	/**
	 * Constructor.
	 */
	public AbstractCreateAccountPreference(Context context, AttributeSet attrs, String createAccountURL) {
		super(context, attrs );
		
		createAccountIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(createAccountURL));
	}	

	
	@Override
    protected void onClick() 
	{
		final Context context = getContext();		
		
		context.startActivity(createAccountIntent);		
	}
}
